package com.dhl.stategy.improve;

import com.dhl.stategy.improve.flybehavior.NoFlyBehavior;
import com.dhl.stategy.improve.quackbehavior.NoQuackBehavior;

/**
 * @title: ToDuck
 * @Author danghailiang
 * @Date: 2022/8/24 1:20
 * @Version 1.0
 */
public class ToDuck extends Duck{


    public ToDuck(){
        setQuackBehavior(new NoQuackBehavior());
        setFlyBehavior(new NoFlyBehavior());
    }

    @Override
    public void display() {
        System.out.println("玩具鸭");
    }

    @Override
    public void swim() {
        System.out.println("玩具鸭不会游泳");
    }
}
